SELECT
<#switch (object__id!)>
	<#case "code">
T.CODE AS code
	<#break>
	<#case "entityId">
T.ENTITY_ID AS entityId
	<#break>
	<#case "id">
T.ID AS id
	<#break>
	<#case "message">
T.MESSAGE AS message
	<#break>
	<#case "operatorDate">
T.OPERATOR_DATE AS operatorDate
	<#break>
	<#case "typeId">
T.TYPE_ID AS typeId
	<#break>
	<#case "userId">
T.USER_ID AS userId
	<#break>
	<#default>
COUNT(1) AS COUNT_
</#switch>
FROM C1_ENTITY_LOG T
<#include "whereByCode.ftl">